﻿<div class="modal-header">
    <h4 ng-if="isCreate" class="modal-title">新增食材标签</h4>
    <h4 ng-if="!isCreate" class="modal-title">编辑食材标签</h4>
</div>
<div class="modal-body">
    <form name="form" ng-submit="save(form.$valid)" class="form-horizontal col-padding-top">
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">标签:</label>
            <div class="col-sm-4">
                <input type="text" ng-model="model.Name" required="" class="form-control" placeholder="请填写标签名称">
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">顺序:</label>
            <div class="col-sm-4">
                <input type="text" ng-model="model.Sort" required="" class="form-control" placeholder="请填写数字">
            </div>
        </div>
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">标签别名:</label>
            <div class="col-sm-4">
                <input type="text" ng-model="model.Alias" required="" class="form-control" placeholder="允许为空">
            </div>
        </div>
        <div class="form-group form-group-sm ">
            <label class="col-sm-2 control-label">所属组分类:</label>
            <div class="col-sm-6">
                <select ng-model="model.Category" required ng-options="choose.Val as choose.Name for choose in materialCategory" class="form-control">
                    <option value="">请选择标签所在食材分组位置</option>
                </select>
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-danger" ng-click="cancel()">取消</button>
    <button class="btn btn-success" ng-click="save()">保存</button>
</div>